﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Microsoft.Practices.Unity;

using Wuqi.Webdiyer;

using ePlanet.SingleWell.Services;


namespace Web.Views.SingleWellManage
{
    public partial class SinglewellStatisticsView : PageBase
    {
        [Dependency]
        public ISingleWellService m_ISingleWellService
        {
            get;
            set;
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int recordCount;
                gv_SingleWellStatistics.DataSource = m_ISingleWellService.StatisticsSinglewellWorkMode(aspNetPagerSearch.PageSize,
                    aspNetPagerSearch.CurrentPageIndex, out recordCount);
                gv_SingleWellStatistics.DataBind();
            }
        }

        protected void aspNetPagerSearch_PageChanging(object sender, PageChangingEventArgs e)
        {
            aspNetPagerSearch.CurrentPageIndex = e.NewPageIndex;
            int recordCount;
            gv_SingleWellStatistics.DataSource = m_ISingleWellService.StatisticsSinglewellWorkMode(aspNetPagerSearch.PageSize,
                aspNetPagerSearch.CurrentPageIndex, out recordCount);
            gv_SingleWellStatistics.DataBind();
        }


    }
}